package com.hive;

import org.apache.hadoop.hive.ql.exec.UDF;

public class GetArea extends UDF  {
    public String evaluate(String phone){
//[0,3)
        String ph=phone.substring(0,3);
        if("138".equals(ph)){
            return "上海";
        }else if("139".equals(ph)){
            return "苏州";
        }else if("133".equals(ph)){
            return "无锡";
        }else if("132".equals(ph)){
            return "南京";
        }else{
            return "未知";
        }
    }
}
